// vite.config.js
import { defineConfig, loadEnv } from "file:///C:/Users/w-zhulicheng/Documents/hengshen-zhengjing-mes-h5/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/w-zhulicheng/Documents/hengshen-zhengjing-mes-h5/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { resolve } from "path";
import postcsspxtoviewport from "file:///C:/Users/w-zhulicheng/Documents/hengshen-zhengjing-mes-h5/node_modules/postcss-px-to-viewport-8-plugin/lib/index.js";
import path from "path";
import { createSvgIconsPlugin } from "file:///C:/Users/w-zhulicheng/Documents/hengshen-zhengjing-mes-h5/node_modules/vite-plugin-svg-icons/dist/index.mjs";
var __vite_injected_original_dirname = "C:\\Users\\w-zhulicheng\\Documents\\hengshen-zhengjing-mes-h5";
var vite_config_default = defineConfig(({ mode, command }) => {
  const env = loadEnv(mode, process.cwd());
  const { VITE_APP_ENV, VITE_APP_BASE_API, VITE_APP_BASE_URL } = env;
  return {
    publicDir: "public",
    base: VITE_APP_ENV === "development" ? "/" : "/",
    resolve: {
      alias: {
        "@": resolve(__vite_injected_original_dirname, "./src")
      },
      extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"]
    },
    server: {
      port: 5137,
      host: true,
      open: true,
      proxy: {
        [`${VITE_APP_BASE_API}`]: {
          target: VITE_APP_BASE_URL,
          changeOrigin: true,
          rewrite: (p) => p.replace(`${VITE_APP_BASE_API}`, ""),
          bypass(req, res, options) {
            const proxyUrl = new URL(options.rewrite(req.url) || "", options.target)?.href || "";
            req.headers["x-req-proxyUrl"] = proxyUrl;
            res.setHeader("x-res-proxyUrl", proxyUrl);
          }
        }
      }
    },
    plugins: [
      vue(),
      createSvgIconsPlugin({
        // 指定 SVG图标 保存的文件夹路径
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        // 指定 使用svg图标的格式
        symbolId: "icon-[dir]-[name]"
      })
    ],
    css: {
      // css预处理器
      preprocessorOptions: {
        scss: {
          // 引入 mixin.scss 这样就可以在全局中使用 mixin.scss中预定义的变量了
          // 给导入的路径最后加上 ;
          additionalData: '@use "@/assets/styles/mixin.scss" as *;'
        }
      },
      postcss: {
        plugins: []
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFx3LXpodWxpY2hlbmdcXFxcRG9jdW1lbnRzXFxcXGhlbmdzaGVuLXpoZW5namluZy1tZXMtaDVcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFVzZXJzXFxcXHctemh1bGljaGVuZ1xcXFxEb2N1bWVudHNcXFxcaGVuZ3NoZW4temhlbmdqaW5nLW1lcy1oNVxcXFx2aXRlLmNvbmZpZy5qc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vQzovVXNlcnMvdy16aHVsaWNoZW5nL0RvY3VtZW50cy9oZW5nc2hlbi16aGVuZ2ppbmctbWVzLWg1L3ZpdGUuY29uZmlnLmpzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnLCBsb2FkRW52IH0gZnJvbSAndml0ZSc7XHJcbmltcG9ydCB2dWUgZnJvbSAnQHZpdGVqcy9wbHVnaW4tdnVlJztcclxuaW1wb3J0IHsgcmVzb2x2ZSB9IGZyb20gJ3BhdGgnO1xyXG5cclxuaW1wb3J0IHBvc3Rjc3NweHRvdmlld3BvcnQgZnJvbSAncG9zdGNzcy1weC10by12aWV3cG9ydC04LXBsdWdpbic7XHJcbmltcG9ydCBwYXRoIGZyb20gJ3BhdGgnO1xyXG5pbXBvcnQgeyBjcmVhdGVTdmd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